Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add org policies to confidential computing example #427

Merged
merged 7 commits into from
Sep 20, 2024

Conversation

arthurlapertosa
Copy link
Contributor

This PR adds org policies to the existing confidential computing example.

@arthurlapertosa arthurlapertosa marked this pull request as ready for review September 12, 2024 14:06
@arthurlapertosa arthurlapertosa requested a review from a team as a code owner September 12, 2024 14:06
@arthurlapertosa
Copy link
Contributor Author

@apeabody Hey, Andrew! Could you please trigger the build on this PR?

@apeabody
Copy link
Contributor

/gcbrun

@arthurlapertosa
Copy link
Contributor Author

arthurlapertosa commented Sep 12, 2024

Looks like TestInstanceSimpleModule is failing, but all the other tests (including the test related to the changes made by this PR) are passing. @apeabody would you have a clue on why it's failing?

@apeabody
Copy link
Contributor

Looks like TestInstanceSimpleModule is failing, but all the other tests (including the test related to the changes made by this PR) are passing. @apeabody would you have a clue on why it's failing?

Hmm, not sure the sudden change in test outcome (perhaps due to new provider version), but will need to be investigated future.

TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: Planning failed. Terraform encountered an error while generating this plan.
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: Error: project in subnetwork's self_link "https://www.googleapis.com/compute/v1/projects/ci-vm-module-1e38/regions/us-central1/subnetworks/cft-vm-test-hcg8" must match subnetwork_project ""
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   with module.instance_simple.module.compute_instance.google_compute_instance_from_template.compute_instance[3],
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   on ../../../modules/compute_instance/main.tf line 45, in resource "google_compute_instance_from_template" "compute_instance":
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   45: resource "google_compute_instance_from_template" "compute_instance" {
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: Error: project in subnetwork's self_link "https://www.googleapis.com/compute/v1/projects/ci-vm-module-1e38/regions/us-central1/subnetworks/cft-vm-test-hcg8" must match subnetwork_project ""
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   with module.instance_simple.module.compute_instance.google_compute_instance_from_template.compute_instance[1],
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   on ../../../modules/compute_instance/main.tf line 45, in resource "google_compute_instance_from_template" "compute_instance":
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   45: resource "google_compute_instance_from_template" "compute_instance" {
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: Error: project in subnetwork's self_link "https://www.googleapis.com/compute/v1/projects/ci-vm-module-1e38/regions/us-central1/subnetworks/cft-vm-test-hcg8" must match subnetwork_project ""
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   with module.instance_simple.module.compute_instance.google_compute_instance_from_template.compute_instance[0],
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   on ../../../modules/compute_instance/main.tf line 45, in resource "google_compute_instance_from_template" "compute_instance":
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   45: resource "google_compute_instance_from_template" "compute_instance" {
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: Error: project in subnetwork's self_link "https://www.googleapis.com/compute/v1/projects/ci-vm-module-1e38/regions/us-central1/subnetworks/cft-vm-test-hcg8" must match subnetwork_project ""
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   with module.instance_simple.module.compute_instance.google_compute_instance_from_template.compute_instance[2],
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   on ../../../modules/compute_instance/main.tf line 45, in resource "google_compute_instance_from_template" "compute_instance":
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185:   45: resource "google_compute_instance_from_template" "compute_instance" {
TestInstanceSimpleModule 2024-09-12T16:03:59Z command.go:185: 
    terraform.go:536: 
        	Error Trace:	/builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/[email protected]/pkg/tft/terraform.go:536
        	            				/workspace/test/integration/instance_simple/instance_simple_test.go:38
        	            				/builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/[email protected]/pkg/tft/terraform.go:638
        	            				/builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/[email protected]/pkg/tft/terraform.go:670
        	            				/builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/[email protected]/pkg/utils/stages.go:31
        	            				/builder/home/go/pkg/mod/github.com/!google!cloud!platform/cloud-foundation-toolkit/infra/[email protected]/pkg/tft/terraform.go:670
        	Error:      	Should not be: 1
        	Test:       	TestInstanceSimpleModule

Copy link
Collaborator

@erlanderlo erlanderlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! one additional cmek policy

@arthurlapertosa
Copy link
Contributor Author

@apeabody can you please rerun the build?

@apeabody
Copy link
Contributor

/gcbrun

Copy link
Collaborator

@erlanderlo erlanderlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks so much. org policies look great!

@arthurlapertosa
Copy link
Contributor Author

@apeabody could you run the build again, please?

@apeabody
Copy link
Contributor

/gcbrun

@arthurlapertosa
Copy link
Contributor Author

@apeabody same error occurring, on TestInstanceSimpleModule. Do you think we can merge this PR anyway?

@apeabody
Copy link
Contributor

@apeabody same error occurring, on TestInstanceSimpleModule. Do you think we can merge this PR anyway?

Hi @arthurlapertosa - This upcoming PR should fix the CI Test: #430

@apeabody
Copy link
Contributor

/gcbrun

Copy link
Contributor

@apeabody apeabody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apeabody apeabody merged commit c5788d0 into terraform-google-modules:master Sep 20, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants